﻿using System.ComponentModel.DataAnnotations;

namespace RndMaterialDisposalService.Models
{
    public class CapitalCompensateReportFormModel
    {
        [Key]
        [Ganss.Excel.Ignore]
        public string Key { get; set; }
        [Ganss.Excel.Column(1,"单号")]
        public string ApplicationNumber { get; set; }
        [Ganss.Excel.Ignore]
        public string ProcInstId { get; set; }
        [Ganss.Excel.Ignore]
        public string ApplicantEmployeeNumber { get; set; }

        [Ganss.Excel.Column(2,"当前处理人")]
        public string ApplicantName { get; set; }

        [Ganss.Excel.Column(3,"资产编号")]
        public string AssetNo { get; set; }
        [Ganss.Excel.Ignore]
        public string Applicant { get; set; }
        [Ganss.Excel.Ignore]
        public string CompensateApplicantName { get; set; }

        [Ganss.Excel.Column(4,"申请人")]
        public string DcCompensateApplicantName => $"{Applicant} {CompensateApplicantName}";

        [Ganss.Excel.Ignore]
        public DateTime? ApplicantTime { get; set; }

        [Ganss.Excel.Column(5, "申请时间")]
        public string? DcApplicantTime => ApplicantTime?.ToString("yyyy-MM-dd");

        [Ganss.Excel.Column(6,"公司段")]
        public string CompanySegment { get; set; }
        [Ganss.Excel.Column(7,"大部门")]
        public string LargeSectors { get; set; }
        [Ganss.Excel.Column(8,"小部门")]
        public string SmallSector { get; set; }
        [Ganss.Excel.Column(9, "部门编码")]
        public string? DepartmentCode { get; set; }
        [Ganss.Excel.Column(10, "分摊责任人")]
        public string? ShareName { get; set; }
        [Ganss.Excel.Column(11, "资产赔偿原因")]
        public string? ReasonsForAssetCompensation { get; set; }
        [Ganss.Excel.Column(12, "赔偿金额")]
        public string? CompensationAmount { get; set; }
        [Ganss.Excel.Ignore]
        public DateTime? StartDate { get; set; }
        [Ganss.Excel.Column(13, "启用日期")]
        public string? DcStartDate => StartDate?.ToString("yyyy-MM-dd");

        [Ganss.Excel.Column(14,"当前环节")]
        public string CurrentStatus { get; set; }
    }

    public class WorkflowProcInstIdModel 
    {
        public string ProcInstId { get; set; }
        public string ApplicationNumber { get; set; }
        public DateTime? ApproveDate { get; set; }
        public string ApproverName { get; set; }
    }
}
